<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <input type="text" id="a">

    <script>

        var oA = document.getElementById('a') ;
        var n = oA.value * 1 ;
        console.log(n) ;

        // 页面一打开就立即执行了
        // value获取到的是空值



        // 点击了之后再获取输入框的值

    </script>
    
</body>
</html>